#include "WPILib.h"

#ifndef __ROBOT2489_h__
#define __ROBOT2489_h__

class Robot2489 : public SimpleRobot
{
	RobotDrive *myRobot; // robot drive system
	Joystick *rightStick; // joystick 1 (arcade stick or right tank stick)
	Joystick *leftStick; // joystick 2 (tank left stick)
	DriverStation *ds; // driver station object
	Compressor *KarlKompressor; // this is a compressor
	Solenoid *solKickOut; // this is the left solenoid
	Solenoid *solKickIn; // this is the right solenoid
	Solenoid *solLatch; //this is the latch solenoid
	//Task *kickTask;
	Timer *kickTimar;
	DriverStationLCD *screen;

	bool kickTriggered;

	enum // Driver Station jumpers to control program operation
	{	RELOADED, // Tank/Arcade jumper is on DS Input 1 (Jumper present is arcade)
		KICKERCHARGED, // Autonomous/Teleop jumper is on DS Input 2 (Jumper present is autonomous)
		LATCHOPENED,
		KICKERRETRACTED,
		LATCHCLOSED,
	} kickerState;
	
	enum // Driver Station jumpers to control program operation
	{	ARCADE_MODE = 1, // Tank/Arcade jumper is on DS Input 1 (Jumper present is arcade)
		ENABLE_AUTONOMOUS = 2, // Autonomous/Teleop jumper is on DS Input 2 (Jumper present is autonomous)
	} jumpers;
	
	enum
	{
		READY;
		KICKERCHARGED;
		LATCHOPENED;
		KICKERRETRACTED;
		LATCHCLOSED;
	} kickerState;
/*private:
	static Robot2489* m_instance;
	static int s_kickFunction(void);*/
public:
	Robot2489(void);
	~Robot2489(void);
	void Autonomous(void);
	void OperatorControl(void);
	//static Robot2489& getInstance(void);
	void kickFunction(void);
	void ChargeKicker(void);
	void RetractKicker(void);
	void ToggleLatch(void);
	void RelaxKicker(void);
};

#endif
